import requests from "./ajax";
import Axios from "axios"





// const cors = require('cors')
// const corsOptions = {
//   origin: 'http://localhost:8080',
//   credentials: true,
//   optionSuccessStatus: 200
// }
// TimeSelector
export const rankScore = () => requests.get("/rankScore");
export const rankBoxOffice = () => requests.get("/rankBoxOffice");
export const line = () => requests.get("/echarts/line");
export const map = () => requests.get("/echarts/map");
export const types = () => requests.get("/types");
export const type = (param1,param2) => requests.get("/type/"+param1,param2);
export const getMovieById = (movieId) => requests.get("/movie/"+movieId);
export const getCommentById = (movieId,current) => requests.get("/comment/"+movieId,current);
export const listMovies = (current) => requests.get("/list/"+current);
export const search = (param) => requests.get("/search",param);
export const typetotal = (param) => requests.get("/total/",param);


// export const getAllEmission = () => requests.get("/getAllEmission");

// Map
// export const getMap = (param) => requests.get("/getMap", param);
  // Map旁折线图
// export const getEmissionLine = (param) => requests.get("/getEmissionLine", param);

// AllProvincePie
// export const getAllProvincePie = (param) => requests.get("/getAllProvincePie", param);

// ProvinceLine
// export const getProvinceLine = (param) => requests.get("/getProvinceLine", param);

// DepartmentBar
// export const getDepartmentBar = (param) => requests.get("/getDepartmentBar", param);

// 获取map地图数据
//export const getMapJson = () => requests.get("/assests/carbon_emission/china.json");



// export const reqGetAllLoginRecords = () => requests.get('/login-record')
// export const reqAddLoginRecord = (loginRecord) => requests.post('/login-record', loginRecord)

// export const reqGetAllPhones = () => requests.get('/phone')
// export const reqGetPhoneById = (id) => requests.get('/phone/' + id)
// export const reqAddPhone = (phone) => requests.post('/phone', phone)
// export const reqDeletePhoneById = (id) => requests.delete('/phone/' + id)
// export const reqUpdatePhoneById = (phone) => requests.put('/phone', phone)
